#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "src/DataControl/DecodeControl.h"
#include <thread>
#include <QTimer>
#include <functional>


QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

typedef  enum  GOOGLE_GEN_FORMAT{
    GG_NOT_SELECT = 0,
    GG_GEN,
    GG_FD,
    GG_STRING,
    GG_OHTER
}G_G_F;


class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private slots:
    void on_decode_clicked();

    void on_creat_clicked();

    void on_openOUT_clicked();

    void on_openDB_clicked();

    void on_insertSQL_clicked();

private:
    Ui::MainWindow *ui;
    QTimer   updateProgress;
    DecodeControl control;
    G_G_F _format;      //谷歌文件格式
    typedef std::function<bool(const std::string&)> FunPtr;
    FunPtr  _fun_Ptr;
};
#endif // MAINWINDOW_H
